//
//  GJFCollectionTableViewCell.m
//  Wedding
//
//  Created by 郭静芬 on 2017/1/12.
//  Copyright © 2017年 郭静芬. All rights reserved.
//

#import "GJFMineCollectionTableViewCell.h"

@implementation GJFMineCollectionTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.contentView.frame = CGRectMake(20 * XX, 20 * YY, WIDTH - 40 * XX, 90 * YY);
        self.layer.cornerRadius = 10 * XX;
        self.clipsToBounds = YES;
        
        [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView).mas_offset(20 * XX);
            make.top.mas_equalTo(self.contentView).mas_offset(25 * YY);
            make.bottom.mas_equalTo(self.contentView).mas_offset(-25 * YY);
            make.width.mas_offset(45 * XX);
        }];
        [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.imageV.mas_right).mas_offset(20 * XX);
            make.top.bottom.mas_equalTo(self.contentView).mas_offset(0);
            make.width.mas_offset(WIDTH / 2);
        }];
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
}
- (UIImageView *)imageV {
    if (!_imageV) {
        _imageV = [[UIImageView alloc] init];
        [self.contentView addSubview:_imageV];
    }
    return _imageV;
}

- (UILabel *)label {
    if (!_label) {
        _label = [[UILabel alloc] init];
        _label.font = [UIFont boldSystemFontOfSize:20 * XX];
        [self.contentView addSubview:_label];
    }
    return _label;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
